//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.mouslisten;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.math.BigDecimal;

import org.come.Frame.ZhuFrame;
import org.come.entity.Goodstable;
import org.come.model.Eshop;
import org.come.until.MessagrFlagUntil;
import org.come.until.UserMessUntil;

public class ShopingImgBorderMosulisten implements MouseListener {
	private Eshop eshop;

	public ShopingImgBorderMosulisten(Eshop eshop) {
		this.eshop = eshop;
	}

	@Override
    public void mouseClicked(MouseEvent e) {
	}

	@Override
    public void mousePressed(MouseEvent e) {
	}

	@Override
    public void mouseReleased(MouseEvent e) {
	}

	@Override
    public void mouseEntered(MouseEvent e) {
		if (MessagrFlagUntil.ImgFlagImg.equals(MessagrFlagUntil.MOUSE1)) {
			MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE12);
		}
		if (this.eshop != null) {
			Goodstable goodstable = UserMessUntil.getgoodstable(new BigDecimal(eshop.getEshopiid()));
			this.eshop.setQunliy(goodstable.getQuality());
			ZhuFrame.getZhuJpanel().creatgoodtext(this.eshop);
		}
	}

	@Override
    public void mouseExited(MouseEvent e) {
		ZhuFrame.getZhuJpanel().cleargoodtext();
		if (MessagrFlagUntil.ImgFlagImg.equals(MessagrFlagUntil.MOUSE12)) {
			MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
		}
	}

	public Eshop getEshop() {
		return this.eshop;
	}

	public void setEshop(Eshop eshop) {
		this.eshop = eshop;
	}
}
